/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package desu.nya.DAO;

import desu.nya.*;
import java.sql.SQLException;
import java.util.List;
import org.primefaces.model.StreamedContent;

/**
 *
 * @author Fess
 */
public interface AnimeDAO {
    public void addAnime(Anime anime) throws SQLException;
    public boolean isExistByHref(Long href) throws SQLException;
    public Anime getAnimeByID(Long id) throws SQLException;
    public void updateAnime(Long anime_id,Anime anime) throws SQLException;
    public List<Anime> getAllAnime() throws SQLException;
    public List<Anime> getAnimeTop(int count,String genre) throws SQLException;
    public void deleteAnime(Anime anime) throws SQLException;
    public StreamedContent getCoverStream(Long id) throws SQLException;
    public List<Anime> getAnimeWithFilter(String name, Long studioId, Long typeEdId, Long genreId, Long exGenreId, int year, int resultSize) throws SQLException;
    public List<Anime> getOngoings() throws SQLException;
    public Rating getRating(Long animeId, String otakuNick) throws SQLException;
    public Anime createAnimeWithStr(String name, Long typeEdId, String chapter, int countOfSer, int duration, String director, Long studioId, Long coverId, String href);
    public int altNameCheck() throws SQLException;
}
